package com.taoym.voucher.common.enums;

import lombok.Getter;

/**
 * @coder taoym
 * @datetime 2021/8/13 21:42
 * @desc
 */
@Getter
public enum TextTypeEnum implements EnumsCommon {

    USER_NEED_READ(2, "用户必读"),
    MT_ATTENTION(3, "美团注意事项"),
    ELM_ATTENTION(4, "饿了么注意事项"),
    MT_NOTICE(5, "美团公告"),
    ELM_NOTICE(6, "饿了么公告");

    private final Integer code;
    private final String msg;

    TextTypeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static TextTypeEnum getInstance(Integer code) {
        for (TextTypeEnum value : values()) {
            if (code.equals(value.code)) {
                return value;
            }
        }
        return null;
    }
}
